//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package messages;

import common.ByteStream;
import common.Utils;
import common.decompressedData;

import java.util.LinkedHashMap;

public class OwnCityData extends Base {
    public static final int msgType = 24123;
    public int HDP1;
    public String CityData;
    private LinkedHashMap<Integer, Integer> inventory = new LinkedHashMap();

    public OwnCityData() {
        super(24123);
    }

    public void encode(ByteStream stream) {
    }

    public void decode(ByteStream stream) {
        this.isDecoded = false;
        stream.skip(16);
        int itemsLen = stream.readShort();

        for(int d = 0; d < itemsLen; ++d) {
            int identifier = stream.readInt();
            int value = stream.readInt();
            this.inventory.put(Integer.valueOf(identifier), Integer.valueOf(value));
        }

        decompressedData var6 = Utils.tryToDecompressData(stream.getUnreadBytes());
        if(var6.resultString.length() > 0) {
            this.CityData = var6.resultString;
            this.isDecoded = true;
        }

    }

    public LinkedHashMap<Integer, Integer> getInventory() {
        return this.inventory;
    }
}
